﻿myApp.controller('RecentTransactController', function ($scope, $http, ngTableParams, $filter, $templateCache, $routeParams, $rootScope) {
    $scope.$emit('newPageLoaded', {
        'title': 'Recently Transacted | ShiJie Property',
        'description': "Recently Transacted Properties. We Work Very Closely With Developers. Over 40 Years Experience. Discover The Latest Property Transactions Today!",
        'keywords': 'recently transacted, recent property transactions'
    });

    //$scope.$emit('newPageLoaded', { 'title': 'Penang Realty 世界地產 Property Transacted History', 'description': 'Free search for real transaction histories in Penang.' });

    pageInit();

    $scope.isLogin = $rootScope.isAuth;


    $templateCache.remove('template/pagination/pagination.html');

    $scope.property = {};
    $scope.isSearch = false;

    $scope.isEmpty = function (obj) {
        for (var i in obj) if (obj.hasOwnProperty(i)) return false;
        return true;
    };


    validateSearch = function () {
        console.log("Validate Search");
        console.log($scope.property);
        var returnval = true;
        var errorval = "";

        if ($scope.property.saleType == "" || $scope.property.saleType == "Select") {
            errorval = "Transaction Type, ";
            returnval = false;
        }
        if (!$scope.property.hasOwnProperty("district")) {
            // make it non compulsory
            $scope.property.district = "";
            //errorval = errorval + "District, ";
            //returnval= false;
        }
        if (!$scope.property.hasOwnProperty("type")) {
            errorval = errorval + "Property Type, ";
            returnval = false;
        }

        if (!$scope.property.hasOwnProperty("keyword") || $scope.property.keyword == "" || typeof $scope.property.keyword === 'undefined') {
            errorval = errorval + "Keyword ";
            returnval = false;
        }
        if (returnval == false) {
            $scope.error = "Ensure these items are not empty: " + errorval;
        }
        return returnval;
        // check if all input are selected.
    }


   



    if ($routeParams.isFiltered == '1') {
        var url;

      //  $scope.property.TypeName = "Industrial";

     //   alert(JSON.stringify($routeParams));
        //$scope.updateProperty(Ty)
        $scope.property.saleType = $routeParams.saleType;

        if ($routeParams.saleType == "S") {
            $scope.property.TransactName = "Sale";
            url = 'api/RecentTransaction/GetRecentSale';

        } else {
            $scope.property.TransactName = "Rent";
            url = 'api/RecentTransaction/GetRecentRent';
        }

        $scope.property.keyword = $routeParams.keyword;
        $scope.property.type = $routeParams.type;
        //$scope.property.type = $routeParams.type;
        switch ($scope.property.type) {
            case "INDUSTRI":
                $scope.property.TypeName = "Industrial";
                break;
            case "PEMBANGUNAN":
                $scope.property.TypeName = "Development";
                break;
            case "PERTANIAN":
                $scope.property.TypeName = "Agriculture";
                break;
            case "PERDAGANGAN":
                $scope.property.TypeName = "Commercial";
                break;
            case "KEDIAMAN":
                $scope.property.TypeName = "Residential";
                break;
            case "LAIN-LAIN":
                $scope.property.TypeName = "Others";
                break;
        }
        $scope.property.districtName = $routeParams.district;
        $scope.searchData = [];

        if (validateSearch() == false) return;
        if ($scope.tableParams !== undefined) $scope.tableParams.reload();
   
        //$scope.property.SaleType = $scope.property.Transact + $scope.property.Type;

        console.log("Property: " + JSON.stringify($scope.property));
        console.log("URL: " + url);


        var dummyData = [{
            "LandType": "INDUSTRI",
            "PropertyType": "KILANG TERES-HUJUNG",
            "Alamat": "JLN SUASA 3/2", "Kawasan": "TMN SUASA SMI PARK",
            "Daerah": "KULIM",
            "Address": "JLN SUASA 3/2,TMN SUASA SMI PARK,KULIM",
            "Price": 235000,
            "TransactionDate": "2013-03-10T00:00:00",
            "Land": 353,
            "BuildUp": 190,
            "Bedroom": 0
        }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN paSERI WAJA 2", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JLN SERI WAJA 2,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 775000, "TransactionDate": "2013-01-23T00:00:00", "Land": 836, "BuildUp": 424, "Bedroom": 0 }
        , { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN SERI WAJA 2", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JLN SERI WAJA 2,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 775000, "TransactionDate": "2013-01-23T00:00:00", "Land": 836, "BuildUp": 424, "Bedroom": 0 }
        , { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN SERI WAJA 2", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JLN SERI WAJA 2,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 775000, "TransactionDate": "2013-01-23T00:00:00", "Land": 1201, "BuildUp": 424, "Bedroom": 0 }
        , { "LandType": "INDUSTRI", "PropertyType": "TANAH KOSONG", "Alamat": "JALAN MAKMUR 7", "Kawasan": "TMN MAKMOR FASA 1", "Daerah": "KULIM", "Address": "JALAN MAKMUR 7,TMN MAKMOR FASA 1,KULIM", "Price": 613135, "TransactionDate": "2013-01-22T00:00:00", "Land": 2119, "BuildUp": 0, "Bedroom": 2 }
        , { "LandType": "INDUSTRI", "PropertyType": "GUDANG", "Alamat": "JALAN MAKMUR 7", "Kawasan": "TMN MAKMOR FASA 1", "Daerah": "KULIM", "Address": "JALAN MAKMUR 7,TMN MAKMOR FASA 1,KULIM", "Price": 1204865, "TransactionDate": "2013-01-22T00:00:00", "Land": 4164, "BuildUp": 2163, "Bedroom": 2 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JALAN WAJA 4", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JALAN WAJA 4,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 450000, "TransactionDate": "2013-01-02T00:00:00", "Land": 836, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JALAN WAJA 4", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JALAN WAJA 4,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 450000, "TransactionDate": "2013-01-02T00:00:00", "Land": 836, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG SESEBUAH DAN PEJABAT", "Alamat": "JALAN MAKMUR 1/2", "Kawasan": "TMN MAKMOR FASA 1", "Daerah": "KULIM", "Address": "JALAN MAKMUR 1/2,TMN MAKMOR FASA 1,KULIM", "Price": 1500000, "TransactionDate": "2012-12-26T00:00:00", "Land": 3618.2, "BuildUp": 231, "Bedroom": 2 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN SERI WAJA 2", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JLN SERI WAJA 2,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 320000, "TransactionDate": "2012-11-21T00:00:00", "Land": 836, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN WAJA 4", "Kawasan": "KAW INDUSTRI WAJA FASA 2", "Daerah": "KULIM", "Address": "JLN WAJA 4,KAW INDUSTRI WAJA FASA 2,KULIM", "Price": 800000, "TransactionDate": "2012-11-08T00:00:00", "Land": 1631, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "JALAN CENGAL 1/3", "Kawasan": "TMN CENGAL INDAH FASA 3", "Daerah": "KULIM", "Address": "JALAN CENGAL 1/3,TMN CENGAL INDAH FASA 3,KULIM", "Price": 175000, "TransactionDate": "2012-11-08T00:00:00", "Land": 171, "BuildUp": 156, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "PLOT 2744", "Kawasan": "TMN SRI SENTOSA", "Daerah": "KULIM", "Address": "PLOT 2744,TMN SRI SENTOSA,KULIM", "Price": 558000, "TransactionDate": "2012-11-01T00:00:00", "Land": 446, "BuildUp": 420, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "TANAH KOSONG", "Alamat": "GIS LOT 4", "Kawasan": "TMN MAKMUR FASA 2", "Daerah": "KULIM", "Address": "GIS LOT 4,TMN MAKMUR FASA 2,KULIM", "Price": 250000, "TransactionDate": "2012-10-12T00:00:00", "Land": 8264, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG SESEBUAH", "Alamat": "LORONG PERUSAHAAN 2B", "Kawasan": "KAW PERUSAHAAN KULIM", "Daerah": "KULIM", "Address": "LORONG PERUSAHAAN 2B,KAW PERUSAHAAN KULIM,KULIM", "Price": 2466754, "TransactionDate": "2012-10-02T00:00:00", "Land": 26021.33, "BuildUp": 1152, "Bedroom": null }, { "LandType": "INDUSTRI", "PropertyType": "KILANG SESEBUAH", "Alamat": "LORONG PERUSAHAAN 2B", "Kawasan": "KAW PERUSAHAAN KULIM", "Daerah": "KULIM", "Address": "LORONG PERUSAHAAN 2B,KAW PERUSAHAAN KULIM,KULIM", "Price": 2033246, "TransactionDate": "2012-10-02T00:00:00", "Land": 21448.36, "BuildUp": 8576, "Bedroom": null }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "JLN PAYA BESAR", "Kawasan": "TMN LOBAK INDAH", "Daerah": "KULIM", "Address": "JLN PAYA BESAR,TMN LOBAK INDAH,KULIM", "Price": 313000, "TransactionDate": "2012-09-19T00:00:00", "Land": 178, "BuildUp": 243, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES", "Alamat": "LRG PERUSAHAAN 2", "Kawasan": "KAW PERUSAHAAN KULIM", "Daerah": "KULIM", "Address": "LRG PERUSAHAAN 2,KAW PERUSAHAAN KULIM,KULIM", "Price": 3200000, "TransactionDate": "2012-09-09T00:00:00", "Land": 5300, "BuildUp": 496, "Bedroom": null }, { "LandType": "INDUSTRI", "PropertyType": "PLOT SESEBUAH", "Alamat": "KAW. PERINDUSTRIAN PADANG MEHA", "Kawasan": "KAW INDUSTRI PDG MEHA (PEC LOT 701)", "Daerah": "KULIM", "Address": "KAW. PERINDUSTRIAN PADANG MEHA,KAW INDUSTRI PDG MEHA (PEC LOT 701),KULIM", "Price": 2906040, "TransactionDate": "2012-09-07T00:00:00", "Land": 22498.3, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN WAJA 5", "Kawasan": "KAW INDUSTRI WAJA FASA 2", "Daerah": "KULIM", "Address": "JLN WAJA 5,KAW INDUSTRI WAJA FASA 2,KULIM", "Price": 660000, "TransactionDate": "2012-08-11T00:00:00", "Land": 1631, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "LRG  MAKMUR 13/1", "Kawasan": "TMN MAKMOR FASA 1", "Daerah": "KULIM", "Address": "LRG  MAKMUR 13/1,TMN MAKMOR FASA 1,KULIM", "Price": 377532, "TransactionDate": "2012-08-06T00:00:00", "Land": 1486, "BuildUp": 67, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT SESEBUAH", "Alamat": "OFF LORONG PERUSAHAAN 5", "Kawasan": "KAW PERUSAHAAN KULIM", "Daerah": "KULIM", "Address": "OFF LORONG PERUSAHAAN 5,KAW PERUSAHAAN KULIM,KULIM", "Price": 2080000, "TransactionDate": "2012-07-03T00:00:00", "Land": 22680, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JALAN WAJA 2", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JALAN WAJA 2,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 1350000, "TransactionDate": "2012-06-14T00:00:00", "Land": 836, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JALAN WAJA 2", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JALAN WAJA 2,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": null, "TransactionDate": "2012-06-14T00:00:00", "Land": 1630, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "LORONG MAKMUR 13/1", "Kawasan": "TMN MAKMOR FASA 1", "Daerah": "KULIM", "Address": "LORONG MAKMUR 13/1,TMN MAKMOR FASA 1,KULIM", "Price": 1075000, "TransactionDate": "2012-06-14T00:00:00", "Land": 1308.73, "BuildUp": 663, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-HUJUNG", "Alamat": "JLN SAUJANA 3", "Kawasan": "TMN INDUSTRI SAUJANA (CITY TECH)", "Daerah": "KULIM", "Address": "JLN SAUJANA 3,TMN INDUSTRI SAUJANA (CITY TECH),KULIM", "Price": 368000, "TransactionDate": "2012-06-13T00:00:00", "Land": 390, "BuildUp": 263, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "TANAH KOSONG", "Alamat": "GIS 2232", "Kawasan": "KAW INDUSTRI PDG MEHA (PEC LOT 701)", "Daerah": "KULIM", "Address": "GIS 2232,KAW INDUSTRI PDG MEHA (PEC LOT 701),KULIM", "Price": 1238007, "TransactionDate": "2012-06-11T00:00:00", "Land": 9747, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG SESEBUAH DAN PEJABAT", "Alamat": "JLN MAKMUR 2/7", "Kawasan": "TMN MAKMUR FASA 2", "Daerah": "KULIM", "Address": "JLN MAKMUR 2/7,TMN MAKMUR FASA 2,KULIM", "Price": 2000000, "TransactionDate": "2012-06-11T00:00:00", "Land": 2189, "BuildUp": 1858, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "TANAH KOSONG", "Alamat": "PDG MEHA", "Kawasan": "KAW INDUSTRI PDG MEHA (PEC LOT 701)", "Daerah": "KULIM", "Address": "PDG MEHA,KAW INDUSTRI PDG MEHA (PEC LOT 701),KULIM", "Price": 1238007, "TransactionDate": "2012-06-11T00:00:00", "Land": 9747, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "NO.506", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "NO.506,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 500000, "TransactionDate": "2012-05-23T00:00:00", "Land": 1138, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN WAJA 4", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JLN WAJA 4,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 450000, "TransactionDate": "2012-05-21T00:00:00", "Land": 836, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT SESEBUAH", "Alamat": "KAW INDUSTRI PADANG MEHA", "Kawasan": "KAW INDUSTRI PDG MEHA (PEC LOT 701)", "Daerah": "KULIM", "Address": "KAW INDUSTRI PADANG MEHA,KAW INDUSTRI PDG MEHA (PEC LOT 701),KULIM", "Price": 2860155, "TransactionDate": "2012-05-19T00:00:00", "Land": 35428.98, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "JLN SAUJANA 2", "Kawasan": "TMN INDUSTRI SAUJANA (CITY TECH)", "Daerah": "KULIM", "Address": "JLN SAUJANA 2,TMN INDUSTRI SAUJANA (CITY TECH),KULIM", "Price": 300000, "TransactionDate": "2012-05-11T00:00:00", "Land": 190, "BuildUp": 263, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "TANAH KOSONG", "Alamat": "LOT 6158", "Kawasan": "TMN MAKMUR FASA 2", "Daerah": "KULIM", "Address": "LOT 6158,TMN MAKMUR FASA 2,KULIM", "Price": 600000, "TransactionDate": "2012-04-24T00:00:00", "Land": 7943, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG SESEBUAH DAN PEJABAT", "Alamat": "LOT 5826", "Kawasan": "TMN MAKMOR FASA 1", "Daerah": "KULIM", "Address": "LOT 5826,TMN MAKMOR FASA 1,KULIM", "Price": 3200000, "TransactionDate": "2012-04-16T00:00:00", "Land": 18565.74, "BuildUp": 2369, "Bedroom": null }, { "LandType": "INDUSTRI", "PropertyType": "TANAH KOSONG", "Alamat": "PLOT 196", "Kawasan": "TMN INDUSTRI SAUJANA (CITY TECH)", "Daerah": "KULIM", "Address": "PLOT 196,TMN INDUSTRI SAUJANA (CITY TECH),KULIM", "Price": 30000, "TransactionDate": "2012-03-26T00:00:00", "Land": 490, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT TERES", "Alamat": "TAMAN CITY - TECH", "Kawasan": "TMN INDUSTRI SAUJANA (CITY TECH)", "Daerah": "KULIM", "Address": "TAMAN CITY - TECH,TMN INDUSTRI SAUJANA (CITY TECH),KULIM", "Price": 30000, "TransactionDate": "2012-03-26T00:00:00", "Land": 200, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "TANAH KOSONG", "Alamat": "LOT 1452", "Kawasan": "KAW INDUSTRI PDG MEHA (PEC LOT 701)", "Daerah": "KULIM", "Address": "LOT 1452,KAW INDUSTRI PDG MEHA (PEC LOT 701),KULIM", "Price": 1145649, "TransactionDate": "2012-03-26T00:00:00", "Land": 13057, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-HUJUNG", "Alamat": "LRG MAKMUR 3/2", "Kawasan": "TMN MAKMOR FASA 1", "Daerah": "KULIM", "Address": "LRG MAKMUR 3/2,TMN MAKMOR FASA 1,KULIM", "Price": 380000, "TransactionDate": "2012-03-15T00:00:00", "Land": 422, "BuildUp": 139, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "LORONG SEMARAK 2", "Kawasan": "TMN SEMARAK (PEC LOT 3490)", "Daerah": "KULIM", "Address": "LORONG SEMARAK 2,TMN SEMARAK (PEC LOT 3490),KULIM", "Price": 280000, "TransactionDate": "2012-02-15T00:00:00", "Land": 174, "BuildUp": 232, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "LORONG SEMARAK 2", "Kawasan": "TMN SEMARAK (PEC LOT 3490)", "Daerah": "KULIM", "Address": "LORONG SEMARAK 2,TMN SEMARAK (PEC LOT 3490),KULIM", "Price": 280000, "TransactionDate": "2012-02-15T00:00:00", "Land": 174, "BuildUp": 232, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JALAN WAJA 4", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JALAN WAJA 4,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 400000, "TransactionDate": "2012-01-18T00:00:00", "Land": 836, "BuildUp": 414, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JALAN WAJA 4", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JALAN WAJA 4,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 400000, "TransactionDate": "2012-01-18T00:00:00", "Land": 836, "BuildUp": 414, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT SESEBUAH", "Alamat": "LOT 1463", "Kawasan": "KAW INDUSTRI PDG MEHA (PEC LOT 701)", "Daerah": "KULIM", "Address": "LOT 1463,KAW INDUSTRI PDG MEHA (PEC LOT 701),KULIM", "Price": 377791, "TransactionDate": "2012-01-12T00:00:00", "Land": 5014, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "JLN. CENGAL 5", "Kawasan": "TMN CENGAL INDAH FASA 3", "Daerah": "KULIM", "Address": "JLN. CENGAL 5,TMN CENGAL INDAH FASA 3,KULIM", "Price": 130000, "TransactionDate": "2012-01-09T00:00:00", "Land": 178, "BuildUp": 147, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN WAJA", "Kawasan": "KAW INDUSTRI WAJA FASA 2", "Daerah": "KULIM", "Address": "JLN WAJA,KAW INDUSTRI WAJA FASA 2,KULIM", "Price": 845000, "TransactionDate": "2011-12-20T00:00:00", "Land": 1630, "BuildUp": 754, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN WAJA", "Kawasan": "KAW INDUSTRI WAJA FASA 2", "Daerah": "KULIM", "Address": "JLN WAJA,KAW INDUSTRI WAJA FASA 2,KULIM", "Price": 845000, "TransactionDate": "2011-12-20T00:00:00", "Land": 1630, "BuildUp": 754, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "LORONG KEMPAS 1/2", "Kawasan": "TMN KEMPAS INDAH 1", "Daerah": "KULIM", "Address": "LORONG KEMPAS 1/2,TMN KEMPAS INDAH 1,KULIM", "Price": 230000, "TransactionDate": "2011-12-16T00:00:00", "Land": 178, "BuildUp": 206, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "LORONG KEMPAS 1/2", "Kawasan": "TMN KEMPAS INDAH 1", "Daerah": "KULIM", "Address": "LORONG KEMPAS 1/2,TMN KEMPAS INDAH 1,KULIM", "Price": 230000, "TransactionDate": "2011-12-16T00:00:00", "Land": 178, "BuildUp": 206, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "NO. 3", "Kawasan": "KAW INDUSTRI KENYALANG", "Daerah": "KULIM", "Address": "NO. 3,KAW INDUSTRI KENYALANG,KULIM", "Price": 185000, "TransactionDate": "2011-11-25T00:00:00", "Land": 167, "BuildUp": 141, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "NO. 3", "Kawasan": "KAW INDUSTRI KENYALANG", "Daerah": "KULIM", "Address": "NO. 3,KAW INDUSTRI KENYALANG,KULIM", "Price": 185000, "TransactionDate": "2011-11-25T00:00:00", "Land": 167, "BuildUp": 141, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "JALAN CENGAL 3", "Kawasan": "TMN CENGAL INDAH FASA 3", "Daerah": "KULIM", "Address": "JALAN CENGAL 3,TMN CENGAL INDAH FASA 3,KULIM", "Price": 209000, "TransactionDate": "2011-11-22T00:00:00", "Land": 245, "BuildUp": 159, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "JALAN CENGAL 3", "Kawasan": "TMN CENGAL INDAH FASA 3", "Daerah": "KULIM", "Address": "JALAN CENGAL 3,TMN CENGAL INDAH FASA 3,KULIM", "Price": 209000, "TransactionDate": "2011-11-22T00:00:00", "Land": 245, "BuildUp": 159, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JALAN WAJA 1", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JALAN WAJA 1,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 730000, "TransactionDate": "2011-11-15T00:00:00", "Land": 1630, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JALAN WAJA 1", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JALAN WAJA 1,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 730000, "TransactionDate": "2011-11-15T00:00:00", "Land": 1630, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "JALAN CENGAL 4", "Kawasan": "TMN CENGAL INDAH FASA 3", "Daerah": "KULIM", "Address": "JALAN CENGAL 4,TMN CENGAL INDAH FASA 3,KULIM", "Price": 135000, "TransactionDate": "2011-11-02T00:00:00", "Land": 171, "BuildUp": 156, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "JALAN CENGAL 4", "Kawasan": "TMN CENGAL INDAH FASA 3", "Daerah": "KULIM", "Address": "JALAN CENGAL 4,TMN CENGAL INDAH FASA 3,KULIM", "Price": 135000, "TransactionDate": "2011-11-02T00:00:00", "Land": 171, "BuildUp": 156, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN WAJA 4", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JLN WAJA 4,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 480000, "TransactionDate": "2011-09-30T00:00:00", "Land": 836, "BuildUp": 414, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN WAJA 4", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JLN WAJA 4,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 480000, "TransactionDate": "2011-09-30T00:00:00", "Land": 836, "BuildUp": 414, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT SESEBUAH", "Alamat": "PT 10872", "Kawasan": "KAW PERUSAHAAN KULIM HI-TECH", "Daerah": "KULIM", "Address": "PT 10872,KAW PERUSAHAAN KULIM HI-TECH,KULIM", "Price": 4320548, "TransactionDate": "2011-02-28T00:00:00", "Land": 7488, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT KEMBAR", "Alamat": "PT 10878", "Kawasan": "KAW PERUSAHAAN KULIM HI-TECH", "Daerah": "KULIM", "Address": "PT 10878,KAW PERUSAHAAN KULIM HI-TECH,KULIM", "Price": null, "TransactionDate": "2011-02-28T00:00:00", "Land": 2276, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT KEMBAR", "Alamat": "PT 10877", "Kawasan": "KAW PERUSAHAAN KULIM HI-TECH", "Daerah": "KULIM", "Address": "PT 10877,KAW PERUSAHAAN KULIM HI-TECH,KULIM", "Price": null, "TransactionDate": "2011-02-28T00:00:00", "Land": 2061, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT KEMBAR", "Alamat": "PT 10874", "Kawasan": "KAW PERUSAHAAN KULIM HI-TECH", "Daerah": "KULIM", "Address": "PT 10874,KAW PERUSAHAAN KULIM HI-TECH,KULIM", "Price": null, "TransactionDate": "2011-02-28T00:00:00", "Land": 2049, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT KEMBAR", "Alamat": "PT 10873", "Kawasan": "KAW PERUSAHAAN KULIM HI-TECH", "Daerah": "KULIM", "Address": "PT 10873,KAW PERUSAHAAN KULIM HI-TECH,KULIM", "Price": null, "TransactionDate": "2011-02-28T00:00:00", "Land": 2049, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT KEMBAR", "Alamat": "PT 10880", "Kawasan": "KAW PERUSAHAAN KULIM HI-TECH", "Daerah": "KULIM", "Address": "PT 10880,KAW PERUSAHAAN KULIM HI-TECH,KULIM", "Price": null, "TransactionDate": "2011-02-28T00:00:00", "Land": 2668, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT KEMBAR", "Alamat": "PT 10875", "Kawasan": "KAW PERUSAHAAN KULIM HI-TECH", "Daerah": "KULIM", "Address": "PT 10875,KAW PERUSAHAAN KULIM HI-TECH,KULIM", "Price": null, "TransactionDate": "2011-02-28T00:00:00", "Land": 2049, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT KEMBAR", "Alamat": "PT 10876", "Kawasan": "KAW PERUSAHAAN KULIM HI-TECH", "Daerah": "KULIM", "Address": "PT 10876,KAW PERUSAHAAN KULIM HI-TECH,KULIM", "Price": null, "TransactionDate": "2011-02-28T00:00:00", "Land": 2030, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT KEMBAR", "Alamat": "PT 10879", "Kawasan": "KAW PERUSAHAAN KULIM HI-TECH", "Daerah": "KULIM", "Address": "PT 10879,KAW PERUSAHAAN KULIM HI-TECH,KULIM", "Price": null, "TransactionDate": "2011-02-28T00:00:00", "Land": 2472, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "LRG PERUSAHAAN 6C(MIEL)", "Kawasan": "KAW PERUSAHAAN KULIM", "Daerah": "KULIM", "Address": "LRG PERUSAHAAN 6C(MIEL),KAW PERUSAHAAN KULIM,KULIM", "Price": 750000, "TransactionDate": "2009-12-02T00:00:00", "Land": 2057, "BuildUp": 1106, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "TANAH KOSONG", "Alamat": "PT 7106", "Kawasan": "KAW PERUSAHAAN KULIM", "Daerah": "KULIM", "Address": "PT 7106,KAW PERUSAHAAN KULIM,KULIM", "Price": 191664, "TransactionDate": "1991-03-25T00:00:00", "Land": 8333, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "TANAH KOSONG", "Alamat": "PT 7106", "Kawasan": "KAW PERUSAHAAN KULIM", "Daerah": "KULIM", "Address": "PT 7106,KAW PERUSAHAAN KULIM,KULIM", "Price": 191664, "TransactionDate": "1991-03-25T00:00:00", "Land": 8333, "BuildUp": 0, "Bedroom": 0 }];


      

            $http.post(url, $scope.property)
               .success(function (result) {
                   console.log("RESULT: " + JSON.stringify(result));
                   $scope.objects = result;
                   console.log(JSON.stringify(result));

                   $scope.totalItems = $scope.objects.length;
                   $scope.currentPage = 1;
                   $scope.numPerPage = 10;
                   $scope.isSearch = true;
                   //$scope.loader.loading = false;
                   //$scope.data.searchData = result;
                   //window.prerenderReady = true;

               })
               .error(function (result) {
                   console.log("ERROR: " + result);
                   //console.log("Error");
                   //console.log(result);
                   //$scope.loader.loading = false;
                   //window.prerenderReady = true;

               }
           )
        

    } else {
        $scope.property.TypeName = "Industrial";
        $scope.property.TransactName = "Sale";
        $scope.property.keyword = "";
        $scope.property.saleType = "S";
        $scope.property.type = "INDUSTRI";
        $scope.property.district = "";
        $scope.property.districtName = "Area";
        $scope.searchData = [];
        console.log(JSON.stringify($scope.property.districtName));
    }
  





    function pageInit() {
        $http.get('api/RecentTransaction/GetDistrict')
             .success(function (data) {
                 console.log(data);
                 $scope.districts = data;
             });
    }

    $scope.updateTransact = function (transact, transactChanged) {
        $scope.propertyTransactChanged = transactChanged;
        $scope.property.saleType = transact;
        switch (transact) {
            case 'S':
                $scope.property.TransactName = "Sale";
                break;
            case 'R':
                $scope.property.TransactName = "Rent";
                break;
        }
    }

    $scope.updateDistrict = function (district, districtChanged) {
        console.log("DISTRICT: " + district);
        $scope.property.district = district;
        $scope.property.districtName = district;
        $scope.districtChanged = districtChanged;
    }

    $scope.updateProperty = function (property, propertyChanged) {
        $scope.propertyTypeChanged = propertyChanged;

        console.log("Propertt chosen: " + property);
        $scope.property.type = property;


        switch (property) {
            case 'I':
                $scope.property.type = "INDUSTRI" ;
                $scope.property.TypeName = "Industrial";
                break;
            case 'D':
                $scope.property.type = "PEMBANGUNAN";
                $scope.property.TypeName = "Development";
                break;
            case 'A':
                $scope.property.type = "PERTANIAN";
                $scope.property.TypeName = "Agriculture";
                break;
            case 'C':
                $scope.property.type = "PERDAGANGAN";
                $scope.property.TypeName = "Commercial";
                break;
            case 'R':
                $scope.property.type = "KEDIAMAN";
                $scope.property.TypeName = "Residential";
                break;
            case 'O':
                $scope.property.type = "LAIN-LAIN";
                $scope.property.TypeName = "Others";
                break;
        }
    }

    $scope.propertyType = [{ "sqlName": "INDUSTRI", "displayName": "INDUSTRIAL" },
                          { "sqlName": "PEMBANGUNAN", "displayName": "DEVELOPMENT" },
                          { "sqlName": "PERTANIAN", "displayName": "AGRICULTURE" },
                          { "sqlName": "PERDAGANGAN", "displayName": "COMMERCIAL" },
                          { "sqlName": "KEDIAMAN", "displayName": "RESIDENTIAL" },
                          { "sqlName": "LAIN-LAIN", "displayName": "OTHERS" }];




    $scope.paginate = function (value) {
        var begin, end, index;
        begin = ($scope.currentPage - 1) * $scope.numPerPage;
        end = begin + $scope.numPerPage;
        index = $scope.objects.indexOf(value);
        return (begin <= index && index < end);
    };



    $scope.is10Selected = true;
    $scope.is25Selected = false;
    $scope.is50Selected = false;
    $scope.is100Selected = false;
    $scope.changePerPage = function (npp) {
        $scope.numPerPage = npp;
        switch (npp) {
            case 10:
                $scope.is10Selected = true;
                $scope.is25Selected = false;
                $scope.is50Selected = false;
                $scope.is100Selected = false;
                break;
            case 25:
                $scope.is10Selected = false;
                $scope.is25Selected = true;
                $scope.is50Selected = false;
                $scope.is100Selected = false;
                break;
            case 50:
                $scope.is10Selected = false;
                $scope.is25Selected = false;
                $scope.is50Selected = true;
                $scope.is100Selected = false;
                break;
            case 100:
                $scope.is10Selected = false;
                $scope.is25Selected = false;
                $scope.is50Selected = false;
                $scope.is100Selected = true;
                break;
        }
        $scope.totalItems = $scope.objects.length;
        $scope.currentPage = 1;
        $scope.numPerPage = npp;
    }



    $scope.search = function () {
        if($scope.isLogin == true){
            if (validateSearch() == false) {
                alert("Field cannot be blank!");
                return;
            }

            if ($scope.tableParams !== undefined) $scope.tableParams.reload();

            var url;
            if ($scope.property.saleType == "S") {
                url = 'api/RecentTransaction/GetRecentSale';
            } else {
                url = 'api/RecentTransaction/GetRecentRent';
            }
            //$scope.property.SaleType = $scope.property.Transact + $scope.property.Type;

            console.log("Property: " + JSON.stringify($scope.property));
            console.log("URL: " + url);


            var dummyData = [{
                "LandType": "INDUSTRI",
                "PropertyType": "KILANG TERES-HUJUNG",
                "Alamat": "JLN SUASA 3/2", "Kawasan": "TMN SUASA SMI PARK",
                "Daerah": "KULIM",
                "Address": "JLN SUASA 3/2,TMN SUASA SMI PARK,KULIM",
                "Price": 235000,
                "TransactionDate": "2013-03-10T00:00:00",
                "Land": 353,
                "BuildUp": 190,
                "Bedroom": 0
            }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN paSERI WAJA 2", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JLN SERI WAJA 2,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 775000, "TransactionDate": "2013-01-23T00:00:00", "Land": 836, "BuildUp": 424, "Bedroom": 0 }
            , { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN SERI WAJA 2", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JLN SERI WAJA 2,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 775000, "TransactionDate": "2013-01-23T00:00:00", "Land": 836, "BuildUp": 424, "Bedroom": 0 }
            , { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN SERI WAJA 2", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JLN SERI WAJA 2,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 775000, "TransactionDate": "2013-01-23T00:00:00", "Land": 1201, "BuildUp": 424, "Bedroom": 0 }
            , { "LandType": "INDUSTRI", "PropertyType": "TANAH KOSONG", "Alamat": "JALAN MAKMUR 7", "Kawasan": "TMN MAKMOR FASA 1", "Daerah": "KULIM", "Address": "JALAN MAKMUR 7,TMN MAKMOR FASA 1,KULIM", "Price": 613135, "TransactionDate": "2013-01-22T00:00:00", "Land": 2119, "BuildUp": 0, "Bedroom": 2 }
            , { "LandType": "INDUSTRI", "PropertyType": "GUDANG", "Alamat": "JALAN MAKMUR 7", "Kawasan": "TMN MAKMOR FASA 1", "Daerah": "KULIM", "Address": "JALAN MAKMUR 7,TMN MAKMOR FASA 1,KULIM", "Price": 1204865, "TransactionDate": "2013-01-22T00:00:00", "Land": 4164, "BuildUp": 2163, "Bedroom": 2 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JALAN WAJA 4", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JALAN WAJA 4,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 450000, "TransactionDate": "2013-01-02T00:00:00", "Land": 836, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JALAN WAJA 4", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JALAN WAJA 4,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 450000, "TransactionDate": "2013-01-02T00:00:00", "Land": 836, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG SESEBUAH DAN PEJABAT", "Alamat": "JALAN MAKMUR 1/2", "Kawasan": "TMN MAKMOR FASA 1", "Daerah": "KULIM", "Address": "JALAN MAKMUR 1/2,TMN MAKMOR FASA 1,KULIM", "Price": 1500000, "TransactionDate": "2012-12-26T00:00:00", "Land": 3618.2, "BuildUp": 231, "Bedroom": 2 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN SERI WAJA 2", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JLN SERI WAJA 2,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 320000, "TransactionDate": "2012-11-21T00:00:00", "Land": 836, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN WAJA 4", "Kawasan": "KAW INDUSTRI WAJA FASA 2", "Daerah": "KULIM", "Address": "JLN WAJA 4,KAW INDUSTRI WAJA FASA 2,KULIM", "Price": 800000, "TransactionDate": "2012-11-08T00:00:00", "Land": 1631, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "JALAN CENGAL 1/3", "Kawasan": "TMN CENGAL INDAH FASA 3", "Daerah": "KULIM", "Address": "JALAN CENGAL 1/3,TMN CENGAL INDAH FASA 3,KULIM", "Price": 175000, "TransactionDate": "2012-11-08T00:00:00", "Land": 171, "BuildUp": 156, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "PLOT 2744", "Kawasan": "TMN SRI SENTOSA", "Daerah": "KULIM", "Address": "PLOT 2744,TMN SRI SENTOSA,KULIM", "Price": 558000, "TransactionDate": "2012-11-01T00:00:00", "Land": 446, "BuildUp": 420, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "TANAH KOSONG", "Alamat": "GIS LOT 4", "Kawasan": "TMN MAKMUR FASA 2", "Daerah": "KULIM", "Address": "GIS LOT 4,TMN MAKMUR FASA 2,KULIM", "Price": 250000, "TransactionDate": "2012-10-12T00:00:00", "Land": 8264, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG SESEBUAH", "Alamat": "LORONG PERUSAHAAN 2B", "Kawasan": "KAW PERUSAHAAN KULIM", "Daerah": "KULIM", "Address": "LORONG PERUSAHAAN 2B,KAW PERUSAHAAN KULIM,KULIM", "Price": 2466754, "TransactionDate": "2012-10-02T00:00:00", "Land": 26021.33, "BuildUp": 1152, "Bedroom": null }, { "LandType": "INDUSTRI", "PropertyType": "KILANG SESEBUAH", "Alamat": "LORONG PERUSAHAAN 2B", "Kawasan": "KAW PERUSAHAAN KULIM", "Daerah": "KULIM", "Address": "LORONG PERUSAHAAN 2B,KAW PERUSAHAAN KULIM,KULIM", "Price": 2033246, "TransactionDate": "2012-10-02T00:00:00", "Land": 21448.36, "BuildUp": 8576, "Bedroom": null }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "JLN PAYA BESAR", "Kawasan": "TMN LOBAK INDAH", "Daerah": "KULIM", "Address": "JLN PAYA BESAR,TMN LOBAK INDAH,KULIM", "Price": 313000, "TransactionDate": "2012-09-19T00:00:00", "Land": 178, "BuildUp": 243, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES", "Alamat": "LRG PERUSAHAAN 2", "Kawasan": "KAW PERUSAHAAN KULIM", "Daerah": "KULIM", "Address": "LRG PERUSAHAAN 2,KAW PERUSAHAAN KULIM,KULIM", "Price": 3200000, "TransactionDate": "2012-09-09T00:00:00", "Land": 5300, "BuildUp": 496, "Bedroom": null }, { "LandType": "INDUSTRI", "PropertyType": "PLOT SESEBUAH", "Alamat": "KAW. PERINDUSTRIAN PADANG MEHA", "Kawasan": "KAW INDUSTRI PDG MEHA (PEC LOT 701)", "Daerah": "KULIM", "Address": "KAW. PERINDUSTRIAN PADANG MEHA,KAW INDUSTRI PDG MEHA (PEC LOT 701),KULIM", "Price": 2906040, "TransactionDate": "2012-09-07T00:00:00", "Land": 22498.3, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN WAJA 5", "Kawasan": "KAW INDUSTRI WAJA FASA 2", "Daerah": "KULIM", "Address": "JLN WAJA 5,KAW INDUSTRI WAJA FASA 2,KULIM", "Price": 660000, "TransactionDate": "2012-08-11T00:00:00", "Land": 1631, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "LRG  MAKMUR 13/1", "Kawasan": "TMN MAKMOR FASA 1", "Daerah": "KULIM", "Address": "LRG  MAKMUR 13/1,TMN MAKMOR FASA 1,KULIM", "Price": 377532, "TransactionDate": "2012-08-06T00:00:00", "Land": 1486, "BuildUp": 67, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT SESEBUAH", "Alamat": "OFF LORONG PERUSAHAAN 5", "Kawasan": "KAW PERUSAHAAN KULIM", "Daerah": "KULIM", "Address": "OFF LORONG PERUSAHAAN 5,KAW PERUSAHAAN KULIM,KULIM", "Price": 2080000, "TransactionDate": "2012-07-03T00:00:00", "Land": 22680, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JALAN WAJA 2", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JALAN WAJA 2,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 1350000, "TransactionDate": "2012-06-14T00:00:00", "Land": 836, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JALAN WAJA 2", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JALAN WAJA 2,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": null, "TransactionDate": "2012-06-14T00:00:00", "Land": 1630, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "LORONG MAKMUR 13/1", "Kawasan": "TMN MAKMOR FASA 1", "Daerah": "KULIM", "Address": "LORONG MAKMUR 13/1,TMN MAKMOR FASA 1,KULIM", "Price": 1075000, "TransactionDate": "2012-06-14T00:00:00", "Land": 1308.73, "BuildUp": 663, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-HUJUNG", "Alamat": "JLN SAUJANA 3", "Kawasan": "TMN INDUSTRI SAUJANA (CITY TECH)", "Daerah": "KULIM", "Address": "JLN SAUJANA 3,TMN INDUSTRI SAUJANA (CITY TECH),KULIM", "Price": 368000, "TransactionDate": "2012-06-13T00:00:00", "Land": 390, "BuildUp": 263, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "TANAH KOSONG", "Alamat": "GIS 2232", "Kawasan": "KAW INDUSTRI PDG MEHA (PEC LOT 701)", "Daerah": "KULIM", "Address": "GIS 2232,KAW INDUSTRI PDG MEHA (PEC LOT 701),KULIM", "Price": 1238007, "TransactionDate": "2012-06-11T00:00:00", "Land": 9747, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG SESEBUAH DAN PEJABAT", "Alamat": "JLN MAKMUR 2/7", "Kawasan": "TMN MAKMUR FASA 2", "Daerah": "KULIM", "Address": "JLN MAKMUR 2/7,TMN MAKMUR FASA 2,KULIM", "Price": 2000000, "TransactionDate": "2012-06-11T00:00:00", "Land": 2189, "BuildUp": 1858, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "TANAH KOSONG", "Alamat": "PDG MEHA", "Kawasan": "KAW INDUSTRI PDG MEHA (PEC LOT 701)", "Daerah": "KULIM", "Address": "PDG MEHA,KAW INDUSTRI PDG MEHA (PEC LOT 701),KULIM", "Price": 1238007, "TransactionDate": "2012-06-11T00:00:00", "Land": 9747, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "NO.506", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "NO.506,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 500000, "TransactionDate": "2012-05-23T00:00:00", "Land": 1138, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN WAJA 4", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JLN WAJA 4,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 450000, "TransactionDate": "2012-05-21T00:00:00", "Land": 836, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT SESEBUAH", "Alamat": "KAW INDUSTRI PADANG MEHA", "Kawasan": "KAW INDUSTRI PDG MEHA (PEC LOT 701)", "Daerah": "KULIM", "Address": "KAW INDUSTRI PADANG MEHA,KAW INDUSTRI PDG MEHA (PEC LOT 701),KULIM", "Price": 2860155, "TransactionDate": "2012-05-19T00:00:00", "Land": 35428.98, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "JLN SAUJANA 2", "Kawasan": "TMN INDUSTRI SAUJANA (CITY TECH)", "Daerah": "KULIM", "Address": "JLN SAUJANA 2,TMN INDUSTRI SAUJANA (CITY TECH),KULIM", "Price": 300000, "TransactionDate": "2012-05-11T00:00:00", "Land": 190, "BuildUp": 263, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "TANAH KOSONG", "Alamat": "LOT 6158", "Kawasan": "TMN MAKMUR FASA 2", "Daerah": "KULIM", "Address": "LOT 6158,TMN MAKMUR FASA 2,KULIM", "Price": 600000, "TransactionDate": "2012-04-24T00:00:00", "Land": 7943, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG SESEBUAH DAN PEJABAT", "Alamat": "LOT 5826", "Kawasan": "TMN MAKMOR FASA 1", "Daerah": "KULIM", "Address": "LOT 5826,TMN MAKMOR FASA 1,KULIM", "Price": 3200000, "TransactionDate": "2012-04-16T00:00:00", "Land": 18565.74, "BuildUp": 2369, "Bedroom": null }, { "LandType": "INDUSTRI", "PropertyType": "TANAH KOSONG", "Alamat": "PLOT 196", "Kawasan": "TMN INDUSTRI SAUJANA (CITY TECH)", "Daerah": "KULIM", "Address": "PLOT 196,TMN INDUSTRI SAUJANA (CITY TECH),KULIM", "Price": 30000, "TransactionDate": "2012-03-26T00:00:00", "Land": 490, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT TERES", "Alamat": "TAMAN CITY - TECH", "Kawasan": "TMN INDUSTRI SAUJANA (CITY TECH)", "Daerah": "KULIM", "Address": "TAMAN CITY - TECH,TMN INDUSTRI SAUJANA (CITY TECH),KULIM", "Price": 30000, "TransactionDate": "2012-03-26T00:00:00", "Land": 200, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "TANAH KOSONG", "Alamat": "LOT 1452", "Kawasan": "KAW INDUSTRI PDG MEHA (PEC LOT 701)", "Daerah": "KULIM", "Address": "LOT 1452,KAW INDUSTRI PDG MEHA (PEC LOT 701),KULIM", "Price": 1145649, "TransactionDate": "2012-03-26T00:00:00", "Land": 13057, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-HUJUNG", "Alamat": "LRG MAKMUR 3/2", "Kawasan": "TMN MAKMOR FASA 1", "Daerah": "KULIM", "Address": "LRG MAKMUR 3/2,TMN MAKMOR FASA 1,KULIM", "Price": 380000, "TransactionDate": "2012-03-15T00:00:00", "Land": 422, "BuildUp": 139, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "LORONG SEMARAK 2", "Kawasan": "TMN SEMARAK (PEC LOT 3490)", "Daerah": "KULIM", "Address": "LORONG SEMARAK 2,TMN SEMARAK (PEC LOT 3490),KULIM", "Price": 280000, "TransactionDate": "2012-02-15T00:00:00", "Land": 174, "BuildUp": 232, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "LORONG SEMARAK 2", "Kawasan": "TMN SEMARAK (PEC LOT 3490)", "Daerah": "KULIM", "Address": "LORONG SEMARAK 2,TMN SEMARAK (PEC LOT 3490),KULIM", "Price": 280000, "TransactionDate": "2012-02-15T00:00:00", "Land": 174, "BuildUp": 232, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JALAN WAJA 4", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JALAN WAJA 4,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 400000, "TransactionDate": "2012-01-18T00:00:00", "Land": 836, "BuildUp": 414, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JALAN WAJA 4", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JALAN WAJA 4,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 400000, "TransactionDate": "2012-01-18T00:00:00", "Land": 836, "BuildUp": 414, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT SESEBUAH", "Alamat": "LOT 1463", "Kawasan": "KAW INDUSTRI PDG MEHA (PEC LOT 701)", "Daerah": "KULIM", "Address": "LOT 1463,KAW INDUSTRI PDG MEHA (PEC LOT 701),KULIM", "Price": 377791, "TransactionDate": "2012-01-12T00:00:00", "Land": 5014, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "JLN. CENGAL 5", "Kawasan": "TMN CENGAL INDAH FASA 3", "Daerah": "KULIM", "Address": "JLN. CENGAL 5,TMN CENGAL INDAH FASA 3,KULIM", "Price": 130000, "TransactionDate": "2012-01-09T00:00:00", "Land": 178, "BuildUp": 147, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN WAJA", "Kawasan": "KAW INDUSTRI WAJA FASA 2", "Daerah": "KULIM", "Address": "JLN WAJA,KAW INDUSTRI WAJA FASA 2,KULIM", "Price": 845000, "TransactionDate": "2011-12-20T00:00:00", "Land": 1630, "BuildUp": 754, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN WAJA", "Kawasan": "KAW INDUSTRI WAJA FASA 2", "Daerah": "KULIM", "Address": "JLN WAJA,KAW INDUSTRI WAJA FASA 2,KULIM", "Price": 845000, "TransactionDate": "2011-12-20T00:00:00", "Land": 1630, "BuildUp": 754, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "LORONG KEMPAS 1/2", "Kawasan": "TMN KEMPAS INDAH 1", "Daerah": "KULIM", "Address": "LORONG KEMPAS 1/2,TMN KEMPAS INDAH 1,KULIM", "Price": 230000, "TransactionDate": "2011-12-16T00:00:00", "Land": 178, "BuildUp": 206, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "LORONG KEMPAS 1/2", "Kawasan": "TMN KEMPAS INDAH 1", "Daerah": "KULIM", "Address": "LORONG KEMPAS 1/2,TMN KEMPAS INDAH 1,KULIM", "Price": 230000, "TransactionDate": "2011-12-16T00:00:00", "Land": 178, "BuildUp": 206, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "NO. 3", "Kawasan": "KAW INDUSTRI KENYALANG", "Daerah": "KULIM", "Address": "NO. 3,KAW INDUSTRI KENYALANG,KULIM", "Price": 185000, "TransactionDate": "2011-11-25T00:00:00", "Land": 167, "BuildUp": 141, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "NO. 3", "Kawasan": "KAW INDUSTRI KENYALANG", "Daerah": "KULIM", "Address": "NO. 3,KAW INDUSTRI KENYALANG,KULIM", "Price": 185000, "TransactionDate": "2011-11-25T00:00:00", "Land": 167, "BuildUp": 141, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "JALAN CENGAL 3", "Kawasan": "TMN CENGAL INDAH FASA 3", "Daerah": "KULIM", "Address": "JALAN CENGAL 3,TMN CENGAL INDAH FASA 3,KULIM", "Price": 209000, "TransactionDate": "2011-11-22T00:00:00", "Land": 245, "BuildUp": 159, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "JALAN CENGAL 3", "Kawasan": "TMN CENGAL INDAH FASA 3", "Daerah": "KULIM", "Address": "JALAN CENGAL 3,TMN CENGAL INDAH FASA 3,KULIM", "Price": 209000, "TransactionDate": "2011-11-22T00:00:00", "Land": 245, "BuildUp": 159, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JALAN WAJA 1", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JALAN WAJA 1,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 730000, "TransactionDate": "2011-11-15T00:00:00", "Land": 1630, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JALAN WAJA 1", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JALAN WAJA 1,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 730000, "TransactionDate": "2011-11-15T00:00:00", "Land": 1630, "BuildUp": 424, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "JALAN CENGAL 4", "Kawasan": "TMN CENGAL INDAH FASA 3", "Daerah": "KULIM", "Address": "JALAN CENGAL 4,TMN CENGAL INDAH FASA 3,KULIM", "Price": 135000, "TransactionDate": "2011-11-02T00:00:00", "Land": 171, "BuildUp": 156, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG TERES-TENGAH", "Alamat": "JALAN CENGAL 4", "Kawasan": "TMN CENGAL INDAH FASA 3", "Daerah": "KULIM", "Address": "JALAN CENGAL 4,TMN CENGAL INDAH FASA 3,KULIM", "Price": 135000, "TransactionDate": "2011-11-02T00:00:00", "Land": 171, "BuildUp": 156, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN WAJA 4", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JLN WAJA 4,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 480000, "TransactionDate": "2011-09-30T00:00:00", "Land": 836, "BuildUp": 414, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "JLN WAJA 4", "Kawasan": "KAW INDUSTRI WAJA FASA 1", "Daerah": "KULIM", "Address": "JLN WAJA 4,KAW INDUSTRI WAJA FASA 1,KULIM", "Price": 480000, "TransactionDate": "2011-09-30T00:00:00", "Land": 836, "BuildUp": 414, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT SESEBUAH", "Alamat": "PT 10872", "Kawasan": "KAW PERUSAHAAN KULIM HI-TECH", "Daerah": "KULIM", "Address": "PT 10872,KAW PERUSAHAAN KULIM HI-TECH,KULIM", "Price": 4320548, "TransactionDate": "2011-02-28T00:00:00", "Land": 7488, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT KEMBAR", "Alamat": "PT 10878", "Kawasan": "KAW PERUSAHAAN KULIM HI-TECH", "Daerah": "KULIM", "Address": "PT 10878,KAW PERUSAHAAN KULIM HI-TECH,KULIM", "Price": null, "TransactionDate": "2011-02-28T00:00:00", "Land": 2276, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT KEMBAR", "Alamat": "PT 10877", "Kawasan": "KAW PERUSAHAAN KULIM HI-TECH", "Daerah": "KULIM", "Address": "PT 10877,KAW PERUSAHAAN KULIM HI-TECH,KULIM", "Price": null, "TransactionDate": "2011-02-28T00:00:00", "Land": 2061, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT KEMBAR", "Alamat": "PT 10874", "Kawasan": "KAW PERUSAHAAN KULIM HI-TECH", "Daerah": "KULIM", "Address": "PT 10874,KAW PERUSAHAAN KULIM HI-TECH,KULIM", "Price": null, "TransactionDate": "2011-02-28T00:00:00", "Land": 2049, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT KEMBAR", "Alamat": "PT 10873", "Kawasan": "KAW PERUSAHAAN KULIM HI-TECH", "Daerah": "KULIM", "Address": "PT 10873,KAW PERUSAHAAN KULIM HI-TECH,KULIM", "Price": null, "TransactionDate": "2011-02-28T00:00:00", "Land": 2049, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT KEMBAR", "Alamat": "PT 10880", "Kawasan": "KAW PERUSAHAAN KULIM HI-TECH", "Daerah": "KULIM", "Address": "PT 10880,KAW PERUSAHAAN KULIM HI-TECH,KULIM", "Price": null, "TransactionDate": "2011-02-28T00:00:00", "Land": 2668, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT KEMBAR", "Alamat": "PT 10875", "Kawasan": "KAW PERUSAHAAN KULIM HI-TECH", "Daerah": "KULIM", "Address": "PT 10875,KAW PERUSAHAAN KULIM HI-TECH,KULIM", "Price": null, "TransactionDate": "2011-02-28T00:00:00", "Land": 2049, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT KEMBAR", "Alamat": "PT 10876", "Kawasan": "KAW PERUSAHAAN KULIM HI-TECH", "Daerah": "KULIM", "Address": "PT 10876,KAW PERUSAHAAN KULIM HI-TECH,KULIM", "Price": null, "TransactionDate": "2011-02-28T00:00:00", "Land": 2030, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "PLOT KEMBAR", "Alamat": "PT 10879", "Kawasan": "KAW PERUSAHAAN KULIM HI-TECH", "Daerah": "KULIM", "Address": "PT 10879,KAW PERUSAHAAN KULIM HI-TECH,KULIM", "Price": null, "TransactionDate": "2011-02-28T00:00:00", "Land": 2472, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "KILANG BERKEMBAR", "Alamat": "LRG PERUSAHAAN 6C(MIEL)", "Kawasan": "KAW PERUSAHAAN KULIM", "Daerah": "KULIM", "Address": "LRG PERUSAHAAN 6C(MIEL),KAW PERUSAHAAN KULIM,KULIM", "Price": 750000, "TransactionDate": "2009-12-02T00:00:00", "Land": 2057, "BuildUp": 1106, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "TANAH KOSONG", "Alamat": "PT 7106", "Kawasan": "KAW PERUSAHAAN KULIM", "Daerah": "KULIM", "Address": "PT 7106,KAW PERUSAHAAN KULIM,KULIM", "Price": 191664, "TransactionDate": "1991-03-25T00:00:00", "Land": 8333, "BuildUp": 0, "Bedroom": 0 }, { "LandType": "INDUSTRI", "PropertyType": "TANAH KOSONG", "Alamat": "PT 7106", "Kawasan": "KAW PERUSAHAAN KULIM", "Daerah": "KULIM", "Address": "PT 7106,KAW PERUSAHAAN KULIM,KULIM", "Price": 191664, "TransactionDate": "1991-03-25T00:00:00", "Land": 8333, "BuildUp": 0, "Bedroom": 0 }];

            //$scope.objects = dummyData;
            ////console.log(result);zw

            //$scope.totalItems = $scope.objects.length;
            //$scope.currentPage = 1;
            //$scope.numPerPage = 10;
            //alert(JSON.stringify($scope.property.keyword));

           

            $http.post(url, $scope.property)
                 .success(function (result) {
                     console.log("RESULT: " + JSON.stringify(result));
                     $scope.objects = result;
                     console.log(result);

                     $scope.totalItems = $scope.objects.length;
                     $scope.currentPage = 1;
                     $scope.numPerPage = 10;
                     $scope.isSearch = true;



                     //$scope.loader.loading = false;
                     //$scope.data.searchData = result;
                     //window.prerenderReady = true;

                 })
                 .error(function (result) {
                     console.log("ERROR: " + result);
                     //console.log("Error");
                     //console.log(result);
                     //$scope.loader.loading = false;
                     //window.prerenderReady = true;

                 });
        }else{
            alert("Please login to view Recently Transacted Property");
        }
    }


});